#ifndef __RK3288_REG_GRF_H__
#define __RK3288_REG_GRF_H__

#define RK3288_GRF_BASE		(0xff770000)

#define GRF_GPIO1D_IOMUX	(0x000C)
#define GRF_GPIO2A_IOMUX	(0x0010)
#define GRF_GPIO2B_IOMUX	(0x0014)
#define GRF_GPIO2C_IOMUX	(0x0018)
#define GRF_GPIO3A_IOMUX	(0x0020)
#define GRF_GPIO3B_IOMUX	(0x0024)
#define GRF_GPIO3C_IOMUX	(0x0028)
#define GRF_GPIO3DL_IOMUX	(0x002C)
#define GRF_GPIO3DH_IOMUX	(0x0030)
#define GRF_GPIO4AL_IOMUX	(0x0034)
#define GRF_GPIO4AH_IOMUX	(0x0038)
#define GRF_GPIO4BL_IOMUX	(0x003C)
#define GRF_GPIO4C_IOMUX	(0x0044)
#define GRF_GPIO4D_IOMUX	(0x0048)
#define GRF_GPIO5B_IOMUX	(0x0050)
#define GRF_GPIO5C_IOMUX	(0x0054)
#define GRF_GPIO6A_IOMUX	(0x005C)
#define GRF_GPIO6B_IOMUX	(0x0060)
#define GRF_GPIO6C_IOMUX	(0x0064)
#define GRF_GPIO7A_IOMUX	(0x006C)
#define GRF_GPIO7B_IOMUX	(0x0070)
#define GRF_GPIO7CL_IOMUX	(0x0074)
#define GRF_GPIO7CH_IOMUX	(0x0078)
#define GRF_GPIO8A_IOMUX	(0x0080)
#define GRF_GPIO8B_IOMUX	(0x0084)

#define GRF_GPIO1H_SR		(0x0104)
#define GRF_GPIO2L_SR		(0x0108)
#define GRF_GPIO2H_SR		(0x010C)
#define GRF_GPIO3L_SR		(0x0110)
#define GRF_GPIO3H_SR		(0x0114)
#define GRF_GPIO4L_SR		(0x0118)
#define GRF_GPIO4H_SR		(0x011C)
#define GRF_GPIO5L_SR		(0x0120)
#define GRF_GPIO5H_SR		(0x0124)
#define GRF_GPIO6L_SR		(0x0128)
#define GRF_GPIO6H_SR		(0x012C)
#define GRF_GPIO7L_SR		(0x0130)
#define GRF_GPIO7H_SR		(0x0134)
#define GRF_GPIO8L_SR		(0x0138)

#define GRF_GPIO1D_P		(0x014C)
#define GRF_GPIO2A_P		(0x0150)
#define GRF_GPIO2B_P		(0x0154)
#define GRF_GPIO2C_P		(0x0158)
#define GRF_GPIO3A_P		(0x0160)
#define GRF_GPIO3B_P		(0x0164)
#define GRF_GPIO3C_P		(0x0168)
#define GRF_GPIO3D_P		(0x016C)
#define GRF_GPIO4A_P		(0x0170)
#define GRF_GPIO4B_P		(0x0174)
#define GRF_GPIO4C_P		(0x0178)
#define GRF_GPIO4D_P		(0x017C)
#define GRF_GPIO5B_P		(0x0184)
#define GRF_GPIO5C_P		(0x0188)
#define GRF_GPIO6A_P		(0x0190)
#define GRF_GPIO6B_P		(0x0194)
#define GRF_GPIO6C_P		(0x0198)
#define GRF_GPIO7A_P		(0x01A0)
#define GRF_GPIO7B_P		(0x01A4)
#define GRF_GPIO7C_P		(0x01A8)
#define GRF_GPIO8A_P		(0x01B0)
#define GRF_GPIO8B_P		(0x01B4)

#define GRF_GPIO1D_E		(0x01CC)
#define GRF_GPIO2A_E		(0x01D0)
#define GRF_GPIO2B_E		(0x01D4)
#define GRF_GPIO2C_E		(0x01D8)
#define GRF_GPIO3A_E		(0x01E0)
#define GRF_GPIO3B_E		(0x01E4)
#define GRF_GPIO3C_E		(0x01E8)
#define GRF_GPIO3D_E		(0x01EC)
#define GRF_GPIO4A_E		(0x01F0)
#define GRF_GPIO4B_E		(0x01F4)
#define GRF_GPIO4C_E		(0x01F8)
#define GRF_GPIO4D_E		(0x01FC)
#define GRF_GPIO5B_E		(0x0204)
#define GRF_GPIO5C_E		(0x0208)
#define GRF_GPIO6A_E		(0x0210)
#define GRF_GPIO6B_E		(0x0214)
#define GRF_GPIO6C_E		(0x0218)
#define GRF_GPIO7A_E		(0x0220)
#define GRF_GPIO7B_E		(0x0224)
#define GRF_GPIO7C_E		(0x0228)
#define GRF_GPIO8A_E		(0x0230)
#define GRF_GPIO8B_E		(0x0234)

#define GRF_SOC_CON0		(0x0244)
#define GRF_SOC_CON1		(0x0248)
#define GRF_SOC_CON2		(0x024C)
#define GRF_SOC_CON3		(0x0250)
#define GRF_SOC_CON4		(0x0254)
#define GRF_SOC_CON5		(0x0258)
#define GRF_SOC_CON6		(0x025C)
#define GRF_SOC_CON7		(0x0260)
#define GRF_SOC_CON8		(0x0264)
#define GRF_SOC_CON9		(0x0268)
#define GRF_SOC_CON10		(0x026C)
#define GRF_SOC_CON11		(0x0270)
#define GRF_SOC_CON12		(0x0274)
#define GRF_SOC_CON13		(0x0278)
#define GRF_SOC_CON14		(0x027C)
#define GRF_SOC_CON15		(0x02A4)
#define GRF_SOC_CON16		(0x02A8)

#define GRF_SOC_STATUS0		(0x0280)
#define GRF_SOC_STATUS1		(0x0284)
#define GRF_SOC_STATUS2		(0x0288)
#define GRF_SOC_STATUS3		(0x028C)
#define GRF_SOC_STATUS4		(0x0290)
#define GRF_SOC_STATUS5		(0x029C)
#define GRF_SOC_STATUS6		(0x02A0)
#define GRF_SOC_STATUS7		(0x02A4)
#define GRF_SOC_STATUS8		(0x02A8)
#define GRF_SOC_STATUS9		(0x02AC)
#define GRF_SOC_STATUS10	(0x02B0)
#define GRF_SOC_STATUS11	(0x02B4)
#define GRF_SOC_STATUS12	(0x02B8)
#define GRF_SOC_STATUS13	(0x02BC)
#define GRF_SOC_STATUS14	(0x02C0)
#define GRF_SOC_STATUS15	(0x02C4)
#define GRF_SOC_STATUS16	(0x02C8)
#define GRF_SOC_STATUS17	(0x02CC)
#define GRF_SOC_STATUS18	(0x02D0)
#define GRF_SOC_STATUS19	(0x02D4)
#define GRF_SOC_STATUS20	(0x02D8)
#define GRF_SOC_STATUS21	(0x02DC)

#define GRF_PERIDMAC_CON0	(0x02E0)
#define GRF_PERIDMAC_CON1	(0x02E4)
#define GRF_PERIDMAC_CON2	(0x02E8)
#define GRF_PERIDMAC_CON3	(0x02EC)

#define GRF_DDRC0_CON0		(0x02F0)
#define GRF_DDRC1_CON0		(0x02F4)

#define GRF_CPU_CON0		(0x02F8)
#define GRF_CPU_CON1		(0x02FC)
#define GRF_CPU_CON2		(0x0300)
#define GRF_CPU_CON3		(0x0304)
#define GRF_CPU_CON4		(0x0308)

#define GRF_CPU_STATUS0		(0x0318)

#define GRF_UOC0_CON0		(0x0320)
#define GRF_UOC0_CON1		(0x0324)
#define GRF_UOC0_CON2		(0x0328)
#define GRF_UOC0_CON3		(0x032C)
#define GRF_UOC0_CON4		(0x0330)
#define GRF_UOC1_CON0		(0x0334)
#define GRF_UOC1_CON1		(0x0338)
#define GRF_UOC1_CON2		(0x033C)
#define GRF_UOC1_CON3		(0x0340)
#define GRF_UOC1_CON4		(0x0344)
#define GRF_UOC2_CON0		(0x0348)
#define GRF_UOC2_CON1		(0x034C)
#define GRF_UOC2_CON2		(0x0350)
#define GRF_UOC2_CON3		(0x0354)
#define GRF_UOC3_CON0		(0x0358)
#define GRF_UOC3_CON1		(0x035C)
#define GRF_UOC4_CON0		(0x0360)
#define GRF_UOC4_CON1		(0x0364)

#define GRF_PVTM_CON0		(0x0368)
#define GRF_PVTM_CON1		(0x036C)
#define GRF_PVTM_CON2		(0x0370)

#define GRF_PVTM_STATUS0	(0x0374)
#define GRF_PVTM_STATUS1	(0x0378)
#define GRF_PVTM_STATUS2	(0x037C)

#define GRF_IO_VSEL			(0x0380)
#define GRF_SARADC_TESTBIT	(0x0384)
#define GRF_TSADC_TESTBIT_L	(0x0388)
#define GRF_TSADC_TESTBIT_H	(0x038C)

#define GRF_OS_REG0			(0x0390)
#define GRF_OS_REG1			(0x0394)
#define GRF_OS_REG2			(0x0398)
#define GRF_OS_REG3			(0x039C)

#endif /* __RK3288_REG_GRF_H__ */
